import request from '../utils/request'

export default {
  // 获取学生分页列表
  getStudentList(pageNo, pageSize, searchObj) {
    return request({
      url: `student/getStudentPageList/${pageNo}/${pageSize}`,
      method: 'post',
      data: searchObj
    })
  },
  // 新增学生信息
  addStudent(student) {
    return request({
      url: 'student/addStudent',
      method: 'post',
      data: student
    })
  },
  // 更新学生信息
  updateStudent(studentId, updateForm) {
    return request({
      url: `student/updateStudent/${studentId}`,
      method: 'put',
      data: updateForm
    })
  },
  // 删除学生信息
  deleteStudent(studentId) {
    return request({
      url: `student/deleteStudent/${studentId}`,
      method: 'delete'
    })
  }
}
